home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / ferm.postinst < prev    next >
Encoding:
Text File  |  2010-02-15  |  1.0 KB  |  46 lines

  1. #!/bin/sh
  2. set -e
  3.  
  4. action=$1
  5. version=$2
  6.  
  7. if [ "$action" = configure ]; then
  8.     . /usr/share/debconf/confmodule
  9.     db_version 2.0
  10.  
  11.     if ! test -f /etc/default/ferm || ! grep -q ^ENABLED= /etc/default/ferm; then
  12.         # copy the enabled flag from debconf to /etc/default/ferm
  13.  
  14.         db_get ferm/enable
  15.         if [ "$RET" = "false" ]; then
  16.             VALUE="no"
  17.         else
  18.             VALUE="yes"
  19.         fi
  20.  
  21.         {
  22.             echo
  23.             echo "# Enable the ferm init script? (i.e. run on bootup)"
  24.             echo "ENABLED=$VALUE"
  25.         } >> /etc/default/ferm
  26.     fi
  27.  
  28.     # make the firewall configuration readable only by root and group adm
  29.     if [ -d /etc/ferm ]; then
  30.         chown -R root:adm /etc/ferm
  31.         chmod 2750 /etc/ferm
  32.     fi
  33. fi
  34.  
  35. # Automatically added by dh_installinit
  36. if [ -x "/etc/init.d/ferm" ]; then
  37.     update-rc.d ferm start 41 S . start 36 0 6 . >/dev/null
  38.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  39.         invoke-rc.d ferm start || exit $?
  40.     else
  41.         /etc/init.d/ferm start || exit $?
  42.     fi
  43. fi
  44. # End automatically added section
  45.  
  46.